package com.guigu.controller.design;


import com.guigu.pojo.design.DGrade;
import com.guigu.service.design.DGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mr.Zhang
 * @since 2024-12-17
 */
@Controller
@RequestMapping("/d-grade")
public class DGradeController {

    @Autowired
    private DGradeService dGradeService;

    @GetMapping("/initialGrade")
    @ResponseBody
    public ArrayList<DGrade> initialGrade() {
        ArrayList<DGrade> dGrades = dGradeService.selectAllGrade();
        return dGrades;
    }

}

